import request from '@/utils/request'

// 查询重大隐患判定依据列表
export function listBasis(query) {
  return request({
    url: '/risk/basis/list',
    method: 'get',
    params: query
  })
}

// 查询重大隐患判定依据详细
export function getBasis(id) {
  return request({
    url: '/risk/basis/' + id,
    method: 'get'
  })
}

// 新增重大隐患判定依据
export function addBasis(data) {
  return request({
    url: '/risk/basis',
    method: 'post',
    data: data
  })
}

// 修改重大隐患判定依据
export function updateBasis(data) {
  return request({
    url: '/risk/basis',
    method: 'put',
    data: data
  })
}

// 删除重大隐患判定依据
export function delBasis(id) {
  return request({
    url: '/risk/basis/' + id,
    method: 'delete'
  })
}

export function listOption(query) {
  return request({
    url: '/risk/basis/allList',
    method: 'get',
    params: query
  })
}

export function allBasis(query) {
  return request({
    url: '/risk/basis/allBasis',
    method: 'get',
    params: query
  })
}
